<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>收藏</title>
</head>
<body>
	<jsp:include page="/WEB-INF/page/common/_header.jsp" />
	<jsp:include page="/WEB-INF/page/common/head.jsp" />
		<div class="pic-list pb150">
			<c:if test="${list == null || list.isEmpty() }">
    			<p style="padding: 10px 10px;">暂无收藏记录</p>
    		</c:if>
			<ul class="clearfix">
				<c:forEach var="itm" items="${list }">
					<li class="clearfix <c:if test='${itm.shelves != 1 }'>finish</c:if>" >
					<a href="<%=basePath %>/course/detail/${itm.id}">
						<div class="pic-list-l">
							<img src="${config.imgUrl }${itm.courseImg}" alt="" />
							<p>
								<c:choose>
									<c:when test="${itm.shelves == 1}">报名中</c:when>
									<c:otherwise>已结束</c:otherwise>
								</c:choose>
							</p>
						</div>
						<div class="pic-list-r">
							<p class="pic-list-title">
								${itm.courseName }
							</p>
							<p class="pic-list-priceWrap clearfix">
								<span class="pic-list-price">￥<span>${itm.currentPrice }</span></span>
							</p>
							<div class="pic-list-rb clearfix">
								<div class="pic-list-time">
									<i class="fa fa-futbol-o" style="font-size: 140%;"></i> <span class="courseType">${itm.courseType }</span>
								</div>
								<div class="pic-list-position">
									<i class="fa fa-street-view" style="font-size: 150%;"></i> <span class="city">${itm.city }</span>  
								</div>
							</div>
						</div>
					</a>
				</li>
				</c:forEach>
			</ul>
		</div>
	<script type="text/javascript">
		$(".courseType").each(function(i,v){
			$(this).html(dictDataFormat("course_type", v.innerHTML));
		});
		$(".city").each(function(i,v){
			$(this).html(dictDataFormat("city", v.innerHTML));
		});
	</script>
	<jsp:include page="/WEB-INF/page/common/_footer.jsp"></jsp:include>
</body>
</html>